#ifndef _CFD_UTILS_H
#define _CFD_UTILS_H

/*
 * The following file contains all the extra macros/data structures/functions
 */

/********************************************************
 * 			Macros
 *******************************************************/

#define 	TOL 		10e-2	/**< Tolerance used for comparisons */


#define		NO_SLIP		1
#define		FREE_SLIP	2
#define		OUTFLOW		3

#define 	C_F		16	/**< The fluid cell */
#define		C_B		0	/**< The Boundary cell */

#define		F_MAX		31	/**< The maximum value of a fluid cell */
#define		O_MAX		15	/**< The maximum value of an obstacle cell */


#define 	F_N		17	/**< fluid cell with a North boundary */
#define 	F_S		18	/**< fluid cell with a South boundary */
#define		F_E		24	/**< fluid cell with a East boundary */
#define		F_W		20	/**< fluid cell with a West boundary */

#define		F_NE		25	/**< fluid cell with a North-East boundary */
#define		F_NW		21	/**< fluid cell with a North-West boundary */
#define		F_SE		26	/**< fluid cell with a South-East boundary */
#define		F_SW		22	/**< fluid cell with a South-West boundary */


/*
 *  The boundary markers
 *  ----------------------------------------------------------
 *  | Left P | Right P| Center | East | West | South | North |
 *  ----------------------------------------------------------
 */
#define 	B_N		1	/**< North edge cell */
#define 	B_S		2	/**< South edge cell */
#define		B_W		4	/**< West  edge cell */
#define		B_E		8	/**< East  edge cell */

#define		B_NE		9	/**< North-East corner cell */
#define		B_NW		5	/**< North-West corner cell */
#define		B_SE		10	/**< South-East corner cell */
#define		B_SW		6	/**< South-West corner cell */

/* The left and right pressure flags */
#define		P_L		64	/**< The left boundary pressure flag */
#define		P_R		32	/**< The right boundary pressure flag */

/*
 * Problem definitions
 */
#define		KARMAN 			"karman"	/**< Von Karman Vortex Street Problem */
#define		CAVITY			"cavity"	/**< Driven Cavity Problem */
#define		PLANE			"plane"		/**< Plane Shear flow Problem */
#define		STEP			"step"		/**< Step Problem */
#define		PROBLEM_MAX_LENGTH	16		/**< The maximum length for the problem name */

/*
 * Flow visualization parameters
 */
#define		STREAK_LINES_PART_MAX	1000		/**< The maximum number of particles visualized using the streaklines */


int is_fluid(int flag);

int is_obstacle(int flag);



#endif
